const express = require('express');
const router = express.Router();
const userController = require('../controllers/userController');
const expressJoi = require('@escook/express-joi')
const {userCheck, loginCheck} = require('../utils/check')
/**
 * 用户注册接口
 */
router.post('/register',expressJoi(userCheck), userController.registerController);

/**
 * 用户登录接口
 */
router.post('/login',expressJoi(loginCheck), userController.loginController);

/**
 * 用户信息查询
 */
router.get('/userInfo', userController.userInfoController);

module.exports = router;
